Yahoo Finance stock price analysis
Intel Corporation
Introduction
This R Markdown report enables to analyze time series from Yahoo Finance of userâs choice. The report takes user input and creates tables, plots and tests based on that input and allows to thoroughly analyze different quotes and time spans without interfering with the code.
This version of report provides several tech and motor companies to choose from, however, should one want to analyze another, he/she should add the abbreviation and companyâs full name to the parameterâs choice list and dictionary and the report would be good to go. Default time range spans back a thousand days from the day of running the report. Should the multiple choice for the quotes be left empty, then as default, all prices are included in the analysis. Last parameter determines the forecast period in days.
Data
Gathering of the time series data is performed via getSymbols function provided in quantmod package. More information about the package can be found here. Data used in this particular report is characterized by following parameters:
- Company name: Intel Corporation
- Company abbreviation: INTC
- Time span: 2015-07-09 - 2021-05-28
- Quotes: High, Low, Close, Volume
- Forecast: 10 days
Below you can see a glimpse of the first and last few observations of the data of your choice.
| Date | INTC.High | INTC.Low | INTC.Close | INTC.Volume |
|---|---|---|---|---|
| 2021-05-27 | 57.88 | 57.00 | 57.73 | 32 373 500 |
| 2021-05-26 | 57.23 | 56.59 | 56.92 | 15 173 600 |
| 2021-05-25 | 57.56 | 56.42 | 56.87 | 22 309 900 |
| 2021-05-24 | 57.39 | 56.40 | 56.96 | 19 164 400 |
| 2021-05-21 | 56.71 | 55.98 | 56.08 | 17 685 600 |
| 2021-05-20 | 56.24 | 55.36 | 55.95 | 23 145 200 |
| Date | INTC.High | INTC.Low | INTC.Close | INTC.Volume |
|---|---|---|---|---|
| 2015-07-16 | 30.48 | 29.10 | 29.90 | 81 166 700 |
| 2015-07-15 | 29.99 | 29.47 | 29.69 | 47 852 500 |
| 2015-07-14 | 30.11 | 29.44 | 29.65 | 39 778 300 |
| 2015-07-13 | 29.82 | 29.19 | 29.73 | 26 452 400 |
| 2015-07-10 | 29.35 | 28.94 | 29.17 | 31 423 800 |
| 2015-07-09 | 29.89 | 28.82 | 28.93 | 47 167 800 |
Descriptive statistics
General
Below you can find a handful of descriptive statistics regarding the columns specified during knitting.
| Variable | Mean | Std. | Min | 1st quartile | Median | 3rd quartile | Max |
|---|---|---|---|---|---|---|---|
| INTC.High | 45.62 | 10.47 | 27.15 | 35.60 | 47.09 | 53.20 | 69.29 |
| INTC.Low | 44.62 | 10.11 | 24.87 | 35.11 | 45.95 | 51.80 | 67.31 |
| INTC.Close | 45.13 | 10.28 | 25.87 | 35.38 | 46.54 | 52.48 | 68.47 |
| INTC.Volume | 26 742 384.69 | 13 280 968.49 | 5 893 800.00 | 18 784 800.00 | 23 414 400.00 | 30 635 300.00 | 182 269 900.00 |
Log returns
This chapter provides insight on the log returns of selected (info on why log returns instead of simple returns is used in finance).
INTC.High
INTC.Low
INTC.Close
Abecadlo z pieca spadlo xd
Plots
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Plotly interactive graph
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
Stationarity analysis
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Trend
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression trend
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + tt + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -9.4900 -0.3349 -0.0055 0.3414 6.2299
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.5496343 0.1500689 3.663 0.000259 ***
## z.lag.1 -0.0177607 0.0048509 -3.661 0.000260 ***
## tt 0.0003763 0.0001186 3.172 0.001546 **
## z.diff.lag 0.0336452 0.0260133 1.293 0.196079
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.886 on 1477 degrees of freedom
## Multiple R-squared: 0.009622, Adjusted R-squared: 0.007611
## F-statistic: 4.783 on 3 and 1477 DF, p-value: 0.002541
##
##
## Value of test-statistic is: -3.6613 4.704 6.7224
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau3 -3.96 -3.41 -3.12
## phi2 6.09 4.68 4.03
## phi3 8.27 6.25 5.34
According to the ADF test the series are integrated of order 0, or in other words have become stationary after 0 differentiation(s). The program differentiated the series until it found order where value of test-statistic: -3.6612974 is smaller than tau3 5pct: -3.41.
Drift
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression drift
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -9.5800 -0.3449 0.0056 0.3464 6.3372
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.01872 0.02314 0.809 0.419
## z.lag.1 -0.98727 0.03634 -27.170 <2e-16 ***
## z.diff.lag 0.01244 0.02602 0.478 0.633
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.8898 on 1477 degrees of freedom
## Multiple R-squared: 0.4876, Adjusted R-squared: 0.4869
## F-statistic: 702.8 on 2 and 1477 DF, p-value: < 2.2e-16
##
##
## Value of test-statistic is: -27.1699 369.103
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau2 -3.43 -2.86 -2.57
## phi1 6.43 4.59 3.78
According to the ADF test the series are integrated of order 1, or in other words have become stationary after 1 differentiation(s). The program differentiated the series until it found order where value of test-statistic: -27.1699459 is smaller than tau3 5pct: -2.86.
None
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression none
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 - 1 + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -9.5612 -0.3265 0.0243 0.3653 6.3553
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## z.lag.1 -0.98641 0.03632 -27.161 <2e-16 ***
## z.diff.lag 0.01201 0.02601 0.462 0.644
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.8897 on 1478 degrees of freedom
## Multiple R-squared: 0.4874, Adjusted R-squared: 0.4867
## F-statistic: 702.6 on 2 and 1478 DF, p-value: < 2.2e-16
##
##
## Value of test-statistic is: -27.1611
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau1 -2.58 -1.95 -1.62
According to the ADF test the series are integrated of order 1, or in other words have become stationary after 1 differentiation(s). The program differentiated the series until it found order where value of test-statistic: -27.1610803 is smaller than tau3 5pct: -1.95.
Forecasting?
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.